package com.usaas.search.service.app;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.usaas.common.core.domain.AjaxResult;
import com.usaas.search.dto.*;
import com.usaas.search.pojo.PlatWelfareMessagePojo;
import com.usaas.search.service.IPlatWelfareMessageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class AppPlatWelfareService {
    @Autowired
    private IPlatWelfareMessageService platWelfareMessageService;

    public AjaxResult platWelfareList(AppPlatWelfareDto dto) {
        Page<PlatWelfareMessagePojo> page = new Page<>(dto.getPageNum(), dto.getPageSize());
        LambdaQueryWrapper<PlatWelfareMessagePojo> wrapper = new LambdaQueryWrapper<PlatWelfareMessagePojo>();
        Page<PlatWelfareMessagePojo> pageResult = platWelfareMessageService.page(page, wrapper);

        return AjaxResult.success(pageResult);
    }
}
